/*
** fill_etude.c for aa in /home/phand/exotest/tek2/prog-elem/trade/trade-42
** 
** Made by david phan
** Login   <phan_d@epitech.net>
** 
** Started on  Fri Jun  1 18:30:54 2012 david phan
** Last update Fri Jun  1 18:31:02 2012 david phan
*/

#include <stdlib.h>
#include <unistd.h>

#include "h_trade.h"

void		fill_etude(int current_action, t_etude *etude)
{
  etude->current_day++;
  etude->tot_action++;
  if (etude->val_max < current_action)
    etude->val_max = current_action;
  if (etude->val_min > current_action)
    etude->val_min = current_action;
  etude->tot_action += current_action;
  etude->moy = etude->tot_action / etude->current_day;
}

